Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add CLUSTER INFO command and use it for new checkedConnectCluster #185

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

stefanwire
Copy link

Redis nodes in cluster mode can be pinged, but a successful pong from one
cluster node would not determine whether the cluster and thus all its nodes are
up and running. The cluster is up only if the CLUSTER INFO command reports
cluster_state:ok.

This PR adds the CLUSTER INFO command and the checkedConnectCluster helper
function for safely connecting to Redis clusters only when the cluster is up.

Redis nodes in cluster mode can be pinged, but a successful pong from one
cluster node would not determine whether the cluster and thus all its nodes are
up and running. The cluster is up only if the `CLUSTER INFO` command reports
`cluster_state:ok`.

This PR adds the `CLUSTER INFO` command and the `checkedConnectCluster` helper
function for safely connecting to Redis clusters only when the cluster is up.
@stefanwire
Copy link
Author

Related to #183.

@stefanwire
Copy link
Author

@jbrechtel, what do you think?

@qnikst
Copy link
Collaborator

qnikst commented May 28, 2023

Hello, @stefanwire! Thanks for your work and sorry for a late reply I've used your branch merged with latest master and tried to run cluster tests there. hedis-test-cluster just hangs for me...

If you are still interested in this issue and Redis cluster support can you take a look into that. Maybe I'm just running it in the wrong way.

I've run docker run -e "IP=0.0.0.0" -p 8000-8010:7000-7010 grokzen/redis-cluster:6.2.11, as 7000 is used my Control Centre application on MacOS, edited test to use port 8000 and started it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants